package com.lwc.backendsinglestructure.service;

import com.lwc.backendsinglestructure.domain.dto.user.CaptchasForm;
import com.lwc.backendsinglestructure.domain.dto.user.ForgetForm;
import com.lwc.backendsinglestructure.domain.dto.user.LoginForm;
import com.lwc.backendsinglestructure.domain.dto.user.RegisterForm;
import com.lwc.backendsinglestructure.domain.entity.User;
import com.lwc.backendsinglestructure.domain.vo.CaptchaVo;
import com.mybatisflex.core.service.IService;

/**
 * 用户 服务层。
 *
 * @author <a href="https://gitee.com/liu-wenchan">程序员Rel</a>
 */
public interface UserService extends IService<User> {

    /**
     * 用户注册
     *
     * @param userAccount   用户账户
     * @param userPassword  用户密码
     * @param checkPassword 校验密码
     * @return 新用户 id
     */
    long userRegister(String userAccount, String userPassword, String checkPassword);


    User login(LoginForm loginRequest);

    Boolean register(RegisterForm registerForm);

    /**
     * 发送验证码
     */
    void sendCaptchas(CaptchasForm captchasForm);

    /**
     * 获取图形验证码
     *
     * @return
     */
    CaptchaVo getCaptchas();

    /**
     * 忘记密码
     *
     * @param forgetForm
     * @return
     */
    Boolean forget(ForgetForm forgetForm);

}
